package org.blackjuly.sign.util;

import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.blackjuly.sign.entity.Chart;

public class LogUtil {
	
	private final static Format format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
	
	public static void debug(String msg) {
		debug(msg, null);
	}
	
	public static void debug(String msg, String arg) {
		if (arg != null) {
			msg = msg.replace("{}", arg);
		}
		Date now = new Date();
		System.out.println(String.format("[debug] %s %s", format.format(now), msg));
	}
	
	public static void info(String msg) {
		info(msg, null);
	}
	
	public static void info(String msg, String arg) {
		if (arg != null) {
			msg = msg.replace("{}", arg);
		}
		Date now = new Date();
		System.out.println(String.format("[info] %s %s", format.format(now), msg));
	}
}